import allRoutes from "./allRoutes"

const dynamicRoutes = [
  {
    path: "/",
    name: "home",
    redirect:"/welcome",
    component:()=>import(/* webpackChunkName: "home" */"../views/Home"),
    children: [
      {
        path: "preorder",
        component: () =>
          import(/*webpackChunkName:"users" */ "../views/Home/Preorder"),
        name: "preorder",
        meta: {
          name: "预支付",
        },
      },
      {
        path: "payment",
        component: () =>
          import(/*webpackChunkName:"users" */ "../views/Home/PayMent"),
        name: "payment",
        meta: {
          name: "支付",
        },
        children: [
          {
            path: "pay",
            component: () =>
              import(/*webpackChunkName:"users" */ "../views/Home/PayMent/Pay"),
            name: "pay",
            meta: {
              name: "支付页",
            },
          },
          {
            path: "paysuccess",
            component: () =>
              import(/*webpackChunkName:"users" */ "../views/Home/PayMent/PaySuccess"),
            name: "paysuccess",
            meta: {
              name: "支付成功",
            },
          },
          {
            path: "payfail",
            component: () =>
              import(/*webpackChunkName:"users" */ "../views/Home/PayMent/PayFail"),
            name: "payfail",
            meta: {
              name: "支付失败",
            },
          },

        ]
      },
    ]
  },
  {
    path: "*",
    component: () => import(/* webpackChunkName: "about" */"../views/Page404"),
  },
]

export default dynamicRoutes